package com.gonsin.gview.model.struct;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@ApiModel("外部枚举")
@Data
//@AllArgsConstructor
@NoArgsConstructor
@Builder
public class EnumItem {

    public EnumItem(String title, Object key, Object value) {
        this.title = title;
        this.key = key;
        this.value = value;
    }

    public EnumItem(String title, Object key, Object value, Object parentKey) {
        this.title = title;
        this.key = key;
        this.value = value;
        this.parentKey = parentKey;
    }

    @ApiModelProperty("显示的文本")
    private String title;

    @ApiModelProperty("唯一的值")
    private Object key;

    @ApiModelProperty("实际需要传递的值")
    private Object value;

    @ApiModelProperty("树状情况，父的主键")
    private Object parentKey;

}
